package com.qf.feign;

import com.baomidou.mybatisplus.plugins.Page;
import com.qf.common.result.ResultEntity;
import com.qf.entity.Goods;
import com.qf.fallBack.GoodsFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "shop-goods", fallback = GoodsFeignServiceFallBack.class)
public interface GoodsFeignService {

    @RequestMapping("/goodsController/addGoods")
    ResultEntity addGoods(@RequestBody Goods goods);

    @RequestMapping("/goodsController/getGoodsPage")
    Page<Goods> getGoodsPage(@RequestBody Page<Goods> page);

    @RequestMapping("/goodsController/getGoodsById/{id}")
    Goods getGoodsById(@PathVariable("id") Integer id);
}
